package io.renren.modules.generator.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import io.renren.modules.generator.entity.StudentsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface StudentsDao extends BaseMapper<StudentsEntity> {

    /**
     * 插入
     * @param studentsEntity
     * @return
     */
    Integer insert(StudentsEntity studentsEntity);

    /**
     * 修改
     * 根据id 修改
     * @param id
     * @param studentsEntity
     * @return
     */
    Integer updateById(Integer id,StudentsEntity studentsEntity);

    /**
     * 删除
     * 根据id 删除
     * @param id
     * @return
     */
    Integer deleteById(Integer id);

    /**
     * 查询列表
     * @return
     */
    List<StudentsEntity> listStudents();
}
